Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development
Brokering SDO data in an SBO
The SBO acts as an intermediary for all data in its SDOs. It serves as a
Data-Sourcefor client-side SmartObjects requesting a variety of data that it can provide. When you use it in another container, such as a SmartWindow, you can link visual objects, such as browsers and viewers, to it. If you make aDatalink from the SBO to such aData-Target, then at run time the SBO examines theSignatureproperty of theData-Targetand compares it to theSignatureof the SDOs. TheContainedDataColumnsSBO property, a delimited list of allDataColumnsin the SDOs, is initialized at startup time by the SBO to assist in this. At run time the client-side SBO is responsible for brokering data to and from the visual objects that are linked to it.In the case of browsers, the SBO provides the browser with the handle of the SDO query it needs to browse (using the
getDataHandlefunction). TheObjectMappingSBO property is built up as browsers are connected to the SBO at run time, to keep track of the SDO queries the browsers are attached to.During the initialization of the SBO, other client objects linked to the SBO are added to the
ObjectMappingproperty. A viewer is mapped to the SDOs that provide the fields it displays and updates. Likewise, the SBO matches any browsers that areData-Targets of the SBO with the appropriate SDO’s temp-table based on matching field/column names. ANavigation-Source(Toolbar band) can specify in its property dialog box which SDO should be theNavigation-Targetfor its event messages. This SDO is also added to theObjectMappingproperty.Navigation-Sources must also specify which SDO should respond to the
Navigationevents. The default is theMasterDataObject, but if this is not the SDO you want, then you must choose the SDOObjectNamein the Instance Property dialog box of the SmartToolbar, as shown in Figure 11–6. Access this dialog box from the Container Builder by choosing the Properties button, or from a static SmartWindow as you would any property sheet.Figure 11–6: SmartToolbar Properties dialog box
![]()
In the case of viewers and other objects that request and display individual fields from the current row, the SBO provides those values by requesting them from one or more contained SDOs and passing them on. The API for these calls is the same as in SDO connections (including the published
dataAvailableevent and thecolValuesfunction). For example, an SBO containing aCustomerSDO and anOrderSDO can feed data to aCustomerSmartDataViewer showing the selectedCustomer, and also to anOrderbrowser showing all retrievedOrdersof the currently selectedCustomer. You can also build a SmartDataViewer against the SBO itself rather than against one of the SDOs. It can request fields from more than one contained SDO. If you build a viewer against an SBO, the viewer wizard displays columns from all contained SDOs, qualified by the SDOObjectName, to allow the user to chose fields from multiple SDOs. When the viewer is built against an SBO in this way, each frame field in the viewer itself will have its SDO’sObjectNameas a table-name qualifier (rather thanRowObject), to allow the SBO to determine which SDO should supply the requested column values. Otherwise, if a viewer is used that you built against one of the contained SDOs, its field names have the standardRowObjectqualifier, and in that case the SBO matches the requested column list against itsContainedDataColumnsto identify the matching field (the first match is taken).
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |